package com.complaint.service.impl;

import com.complaint.dao.impl.UserDAOImpl;
import com.complaint.pojo.Complaint;
import com.complaint.pojo.User;
import com.complaint.service.UserService;

import java.util.List;

public class UserServiceImpl implements UserService {
    @Override
    public int regist(User user) {
        return new UserDAOImpl().add(user);
    }

    @Override
    public List<User> findByName(String username) {
        return new UserDAOImpl().findByName(username);
    }

    @Override
    public int findId(String username) {
        return new UserDAOImpl().findId(username);
    }

    @Override
    public List<Complaint> findForMain(int id) {
        return new UserDAOImpl().findForMain(id);
    }

    @Override
    public int removeUser(String id) {
        return new UserDAOImpl().removeUser(id);
    }
}
